'Declaration
Public Function GetFromFileWithScoreAsync( _ ByVal file As NFile, _ ByVal forReading As System.Boolean _ ) As NPromise(Of NDocumentFormatWithScore)
'Usage
Dim instance As NDocumentFormatRegistry(Of TDocumentFormat) Dim file As NFile Dim forReading As System.Boolean Dim value As NPromise(Of NDocumentFormatWithScore) value = instance.GetFromFileWithScoreAsync(file, forReading)
public NPromise<NDocumentFormatWithScore> GetFromFileWithScoreAsync( NFile file, System.bool forReading )
Parameters
- file
- The file to analyze.
- forReading
- Specifies whether the file is going to be used for reading or for writing.
Return Value
A promise that returns a document format with score. The match score of the returned document format. Can be:
2 - the returned document format matches both the given file extension and header
1 - the returned document format matches either the given file extension or header
0 - the returned document format is the default document format, because no format in this registry matches the given file extension or header